module(...,package.seeall)
require "sprite";

local statusSprites = {};
local flowSprites = {};
local bottleSprites = {};
local statusSpriteSheet,statusSpriteSet;
local flowSpriteSheet,flowSpriteSet;
local bottleSpriteSheet,bottleSpriteSet;
local path = "images/game/"

statusSprites = {
	source = path.."Pow3.png",
	frameWidth = 200,
	frameHeight = 200,
	frameStart = 3,
	frameCount = 8,
	sequences = {
		{name = "wilted", start = 3, count = 8, time = 200, loop = 1},
	}
}

function initSprite()
	local s = statusSprites;
	statusSpriteSheet = sprite.newSpriteSheet(s.source,s.frameWidth,s.frameHeight);
	statusSpriteSet = sprite.newSpriteSet(statusSpriteSheet,s.frameStart,s.frameCount);
	for j=1, #s.sequences do
		local name = s.sequences[j].name;
		local start = s.sequences[j].start;
		local count = s.sequences[j].count;
		local time = s.sequences[j].time;
		local loop = s.sequences[j].loop;
		sprite.add(statusSpriteSet,name,start,count,time,loop);
	end

end
function disposeSprite()
	if statusSpriteSheet then
		statusSpriteSheet:dispose();
		statusSpriteSheet = nil;
	end
end
function getStatusSprites()
	return statusSprites;
end
function getStatusSpriteSet()
	return statusSpriteSet;
end